<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        let p = new Promise((resolve, reject) => {
            resolve('success')
            // reject('fail')
        })
        // p.then(res => {
        //     console.log('成功了', res)
        // }, err => {
        //     console.log('失败了',  err)
        // })
        let thenResult = p.then(res => {
            console.log('成功了', res)
            return 'hello'
        }, err => {
            console.log('失败了', err)
            return 'hello world'
        })
        console.log(thenResult)
        let a = thenResult.then(res => {
            console.log('这个返还值')
            return 11
        })
        console.log(a)


    </script>
</body>
</html>